package com.jiazhong.IO流.字节流;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;

public class InputStreamDemo1 {
    public static void main(String[] args) throws IOException {
        FileInputStream inputStream = new FileInputStream("D:\\Study\\MySQL8安装包.rar");
        byte[] buf = new byte[1024];
        int len = -1;
        while((len=inputStream.read(buf)) != -1){
            String str = new String(buf,0,len);
            System.out.println(str);
        }
        inputStream.close();
    }
}
